/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dieci.managers.rawmaterial;

import dieci.database.rawmaterial.RawMaterialStockHibernateDAO;
import dieci.system.RawMaterialStock;
import java.util.List;

/**
 *
 * @author Blanco
 */
public class RawMaterialStockManager {

    public RawMaterialStockManager() {
        this.rawMaterialStockDAO = new RawMaterialStockHibernateDAO();
    }
    
    public void saveRawMaterialStock(RawMaterialStock rawMaterialStock)
    {
        //call rawmaterialstock dao to save the rawMaterialStock in db
        rawMaterialStockDAO.saveOrUpdate(rawMaterialStock);        
    }
    
    public RawMaterialStock findByRawMaterialId(long id)
    {
        return rawMaterialStockDAO.findByRawMaterialId(id);
    }
    
    public List<RawMaterialStock> list()
    {
        return rawMaterialStockDAO.list();
    }
        
    private RawMaterialStockHibernateDAO rawMaterialStockDAO;
    
}
